<html>
<head><meta charset="utf-8"><title>What does &quot;colliding StableCrateId&quot; mean? · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html">What does &quot;colliding StableCrateId&quot; mean?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="237065781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237065781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237065781">(May 02 2021 at 16:54)</a>:</h4>
<p>I just got this error in <a href="https://github.com/rust-lang/rust/pull/82208#issuecomment-830837319">https://github.com/rust-lang/rust/pull/82208#issuecomment-830837319</a>:</p>
<div class="codehilite"><pre><span></span><code>error: found crates (`serde_derive` and `serde_derive`) with colliding StableCrateId values.
   --&gt; /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/cargo_metadata-0.8.2/src/lib.rs:162:1
    |
162 | extern crate serde_derive;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^
</code></pre></div>
<p>What does this mean? Why would this happen?</p>



<a name="237065871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237065871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237065871">(May 02 2021 at 16:56)</a>:</h4>
<p><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/def_id/struct.StableCrateId.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/def_id/struct.StableCrateId.html</a> says</p>
<blockquote>
<p>A StableCrateId is a 64 bit hash of (crate-name, crate-disambiguator). It is to CrateNum what DefPathHash is to DefId. It is stable across compilation sessions.</p>
</blockquote>
<blockquote>
<p>Since the ID is a hash value there is a (very small) chance that two crates end up with the same StableCrateId. The compiler will check for such collisions when loading crates and abort compilation in order to avoid further trouble.</p>
</blockquote>
<p>I don't see why that would happen here? <code>serde_derive</code> is the <em>same</em> crate in both cases, <code>serde_derive v1.0.125 (proc-macro)</code></p>



<a name="237066121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237066121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237066121">(May 02 2021 at 17:00)</a>:</h4>
<p>That means that the crate has been compiled multiple times with different options, but the same name and disambiguator.</p>



<a name="237066172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237066172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237066172">(May 02 2021 at 17:01)</a>:</h4>
<p>Is there a way to see what the options were?</p>



<a name="237066313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237066313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237066313">(May 02 2021 at 17:03)</a>:</h4>
<p>No, but I did see that both clippy and rustfmt compile it. I don't know if they share a target dir?</p>



<a name="237066324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237066324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237066324">(May 02 2021 at 17:03)</a>:</h4>
<p>they do I think</p>



<a name="237066370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237066370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237066370">(May 02 2021 at 17:04)</a>:</h4>
<p>ok cool, that means I just need clippy and rustfmt to have the same options passed</p>



<a name="237066438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237066438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237066438">(May 02 2021 at 17:05)</a>:</h4>
<p>oh interesting the bug doesn't happen when I specify src/tools/rustfmt specifically (!!) despite not clearing the target dir</p>



<a name="237066516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237066516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237066516">(May 02 2021 at 17:06)</a>:</h4>
<p>I wonder if <code>make_run</code> is choosing a different target</p>



<a name="237066519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237066519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237066519">(May 02 2021 at 17:06)</a>:</h4>
<p>Maybe you need to add <code>in_tree=true</code> for rusfmt to the <code>tool_extended!</code> invocation in <code>tool.rs</code>?</p>



<a name="237066521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237066521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237066521">(May 02 2021 at 17:06)</a>:</h4>
<p>(this error only happens when cross-compiling for somereason)</p>



<a name="237066548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237066548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237066548">(May 02 2021 at 17:07)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F/near/237066519">said</a>:</p>
<blockquote>
<p>Maybe you need to add <code>in_tree=true</code> for rusfmt to the <code>tool_extended!</code> invocation in <code>tool.rs</code>?</p>
</blockquote>
<p>hmm, this is only for <code>check</code> so I wouldn't <em>expect</em> that to be related, but I should update that anyway</p>



<a name="237066675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237066675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237066675">(May 02 2021 at 17:09)</a>:</h4>
<p>nope, didn't help</p>



<a name="237066871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237066871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237066871">(May 02 2021 at 17:12)</a>:</h4>
<p>No clue what caused the issue then.</p>



<a name="237066901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237066901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237066901">(May 02 2021 at 17:12)</a>:</h4>
<p>no problem, the hint about options is already very helpful :)</p>



<a name="237066914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237066914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237066914">(May 02 2021 at 17:13)</a>:</h4>
<p>ooh the <code>-C metadata</code> cargo passes is a hash of the arguments, right? I wonder if this is an argument added directly by bootstrap/bin/rustc so cargo doesn't know about it</p>



<a name="237066928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237066928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237066928">(May 02 2021 at 17:13)</a>:</h4>
<p>Rustbuild confuses me a lot. I am personally stuck with bootstrap somehow causing either cg_clif to link to stage0-rustc <a href="http://librustc_driver.so">librustc_driver.so</a> when it should link to stage1-rustc or distributing the cg_clif for the previous stage.</p>



<a name="237067056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237067056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237067056">(May 02 2021 at 17:15)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F/near/237066914">said</a>:</p>
<blockquote>
<p>ooh the <code>-C metadata</code> cargo passes is a hash of the arguments, right? I wonder if this is an argument added directly by bootstrap/bin/rustc so cargo doesn't know about it</p>
</blockquote>
<p>No, we tell cargo to extend <code>-Cmetadata</code> with a different value for different modes to avoid this kind of problems, but normally this kind of conflict can only happen between eg the standard library dependencies and dependencies of the rustc compiled against it or between the dependencies of rustc and a tool. It shouldn't happen between tools.</p>



<a name="237067174"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237067174" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237067174">(May 02 2021 at 17:17)</a>:</h4>
<p>when you say "shouldn't" - shouldn't happen because all the options should be the same? or because the mode is the same?</p>



<a name="237067487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237067487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237067487">(May 02 2021 at 17:22)</a>:</h4>
<p>also, these are different options to <em>serde_derive</em>, right, not to cargo_metadata?</p>



<a name="237067502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237067502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237067502">(May 02 2021 at 17:22)</a>:</h4>
<p>I wonder if it has to do with it being a proc-macro when cross-compiling</p>



<a name="237067753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237067753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237067753">(May 02 2021 at 17:27)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F/near/237067174">said</a>:</p>
<blockquote>
<p>when you say "shouldn't" - shouldn't happen because all the options should be the same? or because the mode is the same?</p>
</blockquote>
<p>Because either the target dir should be different, the options are all the same and thus the dep is only compiled once, or cargo would use a different hash due to the different options.</p>



<a name="237067906"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237067906" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237067906">(May 02 2021 at 17:30)</a>:</h4>
<p>oh ugh I found why I was having trouble debugging, I was only removing the target-specific dependencies</p>



<a name="237068007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237068007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237068007">(May 02 2021 at 17:32)</a>:</h4>
<p>these are the args the first time, when compiling rustdoc:</p>
<div class="codehilite"><pre><span></span><code>[RUSTC-SHIM] rustc serde_derive command: &quot;LD_LIBRARY_PATH&quot;=&quot;/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0/lib:/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps:/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0/lib&quot; &quot;/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0/bin/rustc&quot; &quot;--crate-name&quot; &quot;serde_derive&quot; &quot;/home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.125/src/lib.rs&quot; &quot;--error-format=json&quot; &quot;--json=diagnostic-rendered-ansi&quot; &quot;--crate-type&quot; &quot;proc-macro&quot; &quot;--emit=dep-info,link&quot; &quot;-C&quot; &quot;prefer-dynamic&quot; &quot;-C&quot; &quot;embed-bitcode=no&quot; &quot;-C&quot; &quot;debuginfo=1&quot; &quot;-C&quot; &quot;overflow-checks=off&quot; &quot;--cfg&quot; &quot;feature=\&quot;default\&quot;&quot; &quot;-C&quot; &quot;metadata=6ce80b6b2688a993&quot; &quot;-C&quot; &quot;extra-filename=-6ce80b6b2688a993&quot; &quot;--out-dir&quot; &quot;/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps&quot; &quot;-L&quot; &quot;dependency=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps&quot; &quot;--extern&quot; &quot;proc_macro2=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps/libproc_macro2-826cefb92e601aa8.rlib&quot; &quot;--extern&quot; &quot;quote=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps/libquote-25d80bdff0ef99a7.rlib&quot; &quot;--extern&quot; &quot;syn=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps/libsyn-07c274bdd5965fc2.rlib&quot; &quot;--extern&quot; &quot;proc_macro&quot; &quot;--cap-lints&quot; &quot;allow&quot; &quot;-Z&quot; &quot;binary-dep-depinfo&quot; &quot;--cfg&quot; &quot;underscore_consts&quot; &quot;-Wrust_2018_idioms&quot; &quot;-Wunused_lifetimes&quot;
</code></pre></div>
<p>and the second time when compiling clippy:</p>
<div class="codehilite"><pre><span></span><code>[RUSTC-SHIM] rustc serde_derive command: &quot;LD_LIBRARY_PATH&quot;=&quot;/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0/lib:/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps:/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0/lib&quot; &quot;/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0/bin/rustc&quot; &quot;--crate-name&quot; &quot;serde_derive&quot; &quot;/home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.125/src/lib.rs&quot; &quot;--error-format=json&quot; &quot;--json=diagnostic-rendered-ansi&quot; &quot;--crate-type&quot; &quot;proc-macro&quot; &quot;--emit=dep-info,link&quot; &quot;-C&quot; &quot;prefer-dynamic&quot; &quot;-C&quot; &quot;embed-bitcode=no&quot; &quot;-C&quot; &quot;debuginfo=1&quot; &quot;-C&quot; &quot;overflow-checks=off&quot; &quot;--cfg&quot; &quot;feature=\&quot;default\&quot;&quot; &quot;-C&quot; &quot;metadata=0bf4af4d60ee3d6b&quot; &quot;-C&quot; &quot;extra-filename=-0bf4af4d60ee3d6b&quot; &quot;--out-dir&quot; &quot;/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps&quot; &quot;-L&quot; &quot;dependency=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps&quot; &quot;--extern&quot; &quot;proc_macro2=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps/libproc_macro2-826cefb92e601aa8.rlib&quot; &quot;--extern&quot; &quot;quote=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps/libquote-25d80bdff0ef99a7.rlib&quot; &quot;--extern&quot; &quot;syn=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps/libsyn-8ed8a8551127e698.rlib&quot; &quot;--extern&quot; &quot;proc_macro&quot; &quot;--cap-lints&quot; &quot;allow&quot; &quot;-Z&quot; &quot;binary-dep-depinfo&quot; &quot;--cfg&quot; &quot;underscore_consts&quot; &quot;-Wrust_2018_idioms&quot; &quot;-Wunused_lifetimes&quot;
</code></pre></div>
<p>and the third time when compiling rustfmt:</p>
<div class="codehilite"><pre><span></span><code>[RUSTC-SHIM] rustc serde_derive command: &quot;LD_LIBRARY_PATH&quot;=&quot;/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0/lib:/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps:/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0/lib&quot; &quot;/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0/bin/rustc&quot; &quot;--crate-name&quot; &quot;serde_derive&quot; &quot;/home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/serde_derive-1.0.125/src/lib.rs&quot; &quot;--error-format=json&quot; &quot;--json=diagnostic-rendered-ansi&quot; &quot;--crate-type&quot; &quot;proc-macro&quot; &quot;--emit=dep-info,link&quot; &quot;-C&quot; &quot;prefer-dynamic&quot; &quot;-C&quot; &quot;embed-bitcode=no&quot; &quot;-C&quot; &quot;debuginfo=1&quot; &quot;-C&quot; &quot;overflow-checks=off&quot; &quot;--cfg&quot; &quot;feature=\&quot;default\&quot;&quot; &quot;-C&quot; &quot;metadata=0bf4af4d60ee3d6b&quot; &quot;-C&quot; &quot;extra-filename=-0bf4af4d60ee3d6b&quot; &quot;--out-dir&quot; &quot;/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps&quot; &quot;-L&quot; &quot;dependency=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps&quot; &quot;--extern&quot; &quot;proc_macro2=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps/libproc_macro2-826cefb92e601aa8.rlib&quot; &quot;--extern&quot; &quot;quote=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps/libquote-25d80bdff0ef99a7.rlib&quot; &quot;--extern&quot; &quot;syn=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps/libsyn-8ed8a8551127e698.rlib&quot; &quot;--extern&quot; &quot;proc_macro&quot; &quot;--cap-lints&quot; &quot;allow&quot; &quot;-Z&quot; &quot;binary-dep-depinfo&quot; &quot;--cfg&quot; &quot;underscore_consts&quot; &quot;-Wrust_2018_idioms&quot; &quot;-Wunused_lifetimes&quot;
</code></pre></div>



<a name="237068115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237068115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237068115">(May 02 2021 at 17:33)</a>:</h4>
<p>this is the difference between rustdoc and clippy:</p>
<blockquote>
<p>"-C" [-"metadata=6ce80b6b2688a993"-] {+"metadata=0bf4af4d60ee3d6b"+} "-C" [-"extra-filename=-6ce80b6b2688a993"-] {+"extra-filename=-0bf4af4d60ee3d6b"+} "--extern" [-"syn=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps/libsyn-07c274bdd5965fc2.rlib"-] {+"syn=/home/joshua/rustc/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps/libsyn-8ed8a8551127e698.rlib"+}</p>
</blockquote>



<a name="237068184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237068184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> hyd-dev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237068184">(May 02 2021 at 17:34)</a>:</h4>
<p>That "colliding StableCrateId values" error looks similar to these:<br>
<a href="https://github.com/rust-lang/rust/issues/82991#issuecomment-799400945">https://github.com/rust-lang/rust/issues/82991#issuecomment-799400945</a><br>
<a href="https://github.com/rust-lang/rust/issues/82991#issuecomment-802862822">https://github.com/rust-lang/rust/issues/82991#issuecomment-802862822</a></p>



<a name="237068194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237068194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237068194">(May 02 2021 at 17:34)</a>:</h4>
<p>but there is <em>no</em> difference between clippy and rustfmt</p>



<a name="237068213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237068213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237068213">(May 02 2021 at 17:35)</a>:</h4>
<p>ok yes <a href="https://github.com/rust-lang/rust/issues/56935">https://github.com/rust-lang/rust/issues/56935</a> looks like the problem</p>



<a name="237068332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237068332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237068332">(May 02 2021 at 17:37)</a>:</h4>
<p>I'm not sure the workaround is feasible here because it happens in a dependency, we'd have to patch cargo_metadata or serde or both</p>



<a name="237068756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237068756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237068756">(May 02 2021 at 17:44)</a>:</h4>
<p>Another solution is to pin different version of serde for rustfmt and clippy lol</p>



<a name="237070665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237070665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237070665">(May 02 2021 at 18:13)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> Do you know why <code>add_to_sysroot</code> is in <code>tool_check_step</code>?  That is, why is <code>x.py check</code> copying everything to the sysroot?</p>



<a name="237070791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237070791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237070791">(May 02 2021 at 18:15)</a>:</h4>
<p>Removing that seems to fix your problem.</p>



<a name="237070805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237070805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237070805">(May 02 2021 at 18:15)</a>:</h4>
<p>Oh that's a really good point</p>



<a name="237070877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237070877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237070877">(May 02 2021 at 18:16)</a>:</h4>
<p>x.py does that for libstd and the compiler because they're used by the compiler and tools respectively, but nothing depends on the tools</p>



<a name="237071057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/What%20does%20%22colliding%20StableCrateId%22%20mean%3F/near/237071057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/What.20does.20.22colliding.20StableCrateId.22.20mean.3F.html#237071057">(May 02 2021 at 18:19)</a>:</h4>
<p>Let me know if that doesn't work or causes other problems.  I'm stepping away for a bit to eat lunch, but I'll be around.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>